<template>
    <div>
        <p>App 组件</p>
        <mt-button type='default' size='small'>default</mt-button>
        <mt-button type='danger' size='small' plain>danger</mt-button>
        <mt-button type='danger' size='small'  disabled>disabled</mt-button>
        <mt-button @click="getList" type='primary' size='small'>show</mt-button>
        <router-link to="/login">Login</router-link>
        <router-link to="/register">Register</router-link>
        <router-view></router-view>
    </div>
</template>

<script>
import {Toast} from 'mint-ui'
export default{
    data(){
        return {
            toastInstanse:null
        };
    },
    created(){
        this.getList();
    },
    methods:{
        getList(){
            this.show();
            setTimeout(()=>{
                this.toastInstanse.close()
            },3000)
        },
        show(){
            // Toast("提示信息");
           this.toastInstanse=Toast({
                message:'提示信息',
                duration:-1,
                position:'top',
                iconClass:'glyphicon glyphicon-heart',
                className:'mytoast'
            })
        }
    }
}
</script>

<style>
    
</style>